package org.zappee.peterk.custom.controller
{
	import org.zappee.peterk.custom.model.BugModel;
	import org.zappee.peterk.custom.model.interfaces.IBugModel;
	
	import mx.collections.ArrayCollection;
	
	[Bindable]
	public class ApplicationController
	{
		private var _bugModel: BugModel;
		
		private var _isTesting: Boolean;
		
		public function get bugModel(): IBugModel
		{
			return this._bugModel;
		}
		
		public function set bugModel( value: IBugModel ): void
		{
			// dont set
		}
		
		public function get isTesting(): Boolean
		{
			return this._isTesting;
		}
		
		public function set isTesting( value: Boolean ): void
		{
			this._isTesting = value;
		}
		
		public function ApplicationController()
		{
			this.setup();
		}
		
		/**
		 * Sets up the application.
		 */
		protected function setup(): void
		{
			this._bugModel = new BugModel();
			this._bugModel.bugs = new ArrayCollection();
		}
		
		/**
		 * Shows the tests for this 
		 * application.
		 */
		public function doTests(): void
		{
			this.isTesting = true;
		}
	}
}